//引入common.js的方法
import requestOfPost from '../axios/common'

export function postRequest(url, data) {
    return new Promise((resolve, reject) => {
        //成功处理
        requestOfPost(url, data).then(res => resolve(res))
            //失败抛出错误
            .catch(error => reject(error))
    })
}